<!doctype html>
<html>
	<head id="top">
		<meta charset="UTF-8">
		<title>{{title}}</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../../css/cmms.css"/>
		<link rel="stylesheet" href="../../../css/doctor/project/common.css" />
		<link rel="stylesheet" href="../../../css/doctor/project/thyroidTest.css" />
		<link rel="stylesheet" href="../../../css/doctor/project/iconfont.css" />
	</head>
	<body>
		<!--列表项-->
		<section>
			<div id="box">
				<ul class="itemBox"> 
			        <li v-for="msg in message" @click="jumpTestDetail(msg.id,msg.name)">
		            	<span class="listIcon">
		            		<i class="icon iconfont icon-tubiaozhizuomoban3"></i>
		            	</span>
			            <a>
			            	<span class="listDetail">{{msg.name}}</span>
			            </a>
			        </li>
				</ul>
				<div class="noData" v-show="!message.length>0">
					<p><img src="../../../img/nodata.png"/></p>
					<p>暂无内容</p>
				</div>
			</div>
		</section>
		<script src="../../../js/mui.min.js"></script>
		<script src="../../../js/vue.js"></script>
		<script src="../../../js/cmms.js?time=333"></script>
		<script type="text/javascript">
			mui.init()
		</script>
		<script type="text/javascript">
			var top=new Vue({
				el:'#top',
				data:{
					title:''
				},
				mounted(){
					let url=location.href.split("?")[1];
					this.get(url);
				},
				methods:{
					get:function(url){
						let _this=this;
						if(url){
							let code=url.split("&")[1].split("=")[1];
							let t = decodeURI(decodeURI(code)); 
							_this.title=t;
						}
					}
				}
			});
			var box=new Vue({
				el:'#box',
				data:{
					message:[],
					id:'',
					state:''
				},
				mounted(){
					url=location.href.split('?')[1];
					this.getCode(url);
					this.loadMessage(this.url);
				},
				methods:{
					getCode:function(url){
						let _this=this;
						let code=url.split('&')[0].split('=')[1];
						_this.id=code;
						console.log(_this.id);
					},
					loadMessage:function(url){
						let _this=this;
						_this.state = localStorage.getItem('stateS');
						AT.muiAjaxDoctor('/common/common/selectItemByCateId','post',{
								id:_this.id
							},
							function(res){
								console.log(res);
								_this.message = res;
//								console.log(this.message);
						});
					},
					//跳转到测试明细
					jumpTestDetail:function(id,title){
						let _this = this;
						let t= encodeURI(encodeURI(title));
						
						console.log(_this.state);
						if(_this.state=='xm'){
							location.href="testDetail.html?id="+id+"&title="+t;
						}else{
							location.href="clinicalTest.html?id="+id+"&title="+t;
						}
					}
				}
			});
		</script>
	</body>

</html>